package org.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.sql.Timestamp;

@Data
@Schema(description = "出库申请")
public class OutstockApply {
    @TableId(type = IdType.AUTO)
    @Schema(description = "申请ID")
    private Long id;

    @Schema(description = "申请类型（1：领用，2：销售）")
    private Integer applyType;
    @Schema(description = "仓库ID")
    private Long warehouseId;
    @Schema(description = "商品ID")
    private Long goodsId;

    @Schema(description = "申请数量")
    private Double quantity;

    @Schema(description = "申请人ID")
    private Long applicantId;

    @Schema(description = "审批人ID")
    private Long approverId;

    // 审批意见
    @Schema(description = "审批意见")
    private String approvalComment;

    // 申请原因
    @Schema(description = "申请原因")
    private String applyReason;

    // 审批时间
    @Schema(description = "审批时间")
    private Timestamp approvalTime;

    @Schema(description = "审批状态（0：待审批，1：已通过，2：已拒绝）")
    private Integer status;

    @Schema(description = "创建时间")
    private Timestamp createTime;

    @Schema(description = "更新时间")
    private Timestamp updateTime;

    @TableField(exist = false)
    @Schema(description = "申请人")
    private User applicant;

    @TableField(exist = false)
    @Schema(description = "商品信息")
    private GoodsInfo goodsInfo;

    @TableField(exist = false)
    @Schema(description = "仓库信息")
    private WarehouseInfo warehouse;

    @TableField(exist = false)
    @Schema(description = "审批人")
    private User approver;
} 